Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable MiMa #191

Merged
merged 4 commits into from
Feb 17, 2022
Merged

Enable MiMa #191

merged 4 commits into from
Feb 17, 2022

Conversation

danicheg
Copy link
Member

Fixes #190.
There are many different binary compatibility issues, so I suggest just starting checking binary compatibility from the 1.0.6 version (the last released is 1.0.7). Any concerns about this?

@armanbilge
Copy link
Member

What are the MiMa issues?

We can usually ignore MiMa issues on Scala 3 since it doesn't automatically recognized package-privates.

Comment on lines +24 to +29
// we are checking binary compatibility from the 1.0.6 version
mimaPreviousArtifacts ~= {
_.filter { m =>
VersionNumber(m.revision).matchesSemVer(SemanticSelector(">=1.0.6"))
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternately:

ThisBuild / tlVersionIntroduced := List("2.12", "2.13", "3").map(_ -> "1.0.6").toMap

@danicheg
Copy link
Member Author

@armanbilge It founds out that munit-cats-effect has binary issues with almost every version from 1.0.0 to 1.0.5. If you wonder about particular problems, here is the small part of it:

[error] munit-cats-effect-2: Failed binary compatibility check against org.typelevel:munit-cats-effect-2_2.13:1.0.0 (e:info.versionScheme=early-semver)! Found 2 potential problems
[error]  * object munit.CatsEffectFixtures#ResourceSuiteLocalFixture does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("munit.CatsEffectFixtures$ResourceSuiteLocalFixture$")
[error]  * method ResourceSuiteLocalFixture()munit.CatsEffectFixtures#ResourceSuiteLocalFixture# in class munit.CatsEffectSuite has a different result type in current version, where it is munit.CatsEffectFixturesPlatform#ResourceSuiteLocalFixture# rather than munit.CatsEffectFixtures#ResourceSuiteLocalFixture#
[error]    filter with: ProblemFilters.exclude[IncompatibleResultTypeProblem]("munit.CatsEffectSuite.ResourceSuiteLocalFixture")
[error] (ce3JS / mimaPreviousClassfiles) sbt.librarymanagement.ResolveException: Error downloading org.typelevel:munit-cats-effect-3_sjs1_2.13:1.0.4
[error]   Not found
[error]   not found: /home/danicheg/.ivy2/local/org.typelevel/munit-cats-effect-3_sjs1_2.13/1.0.4/ivys/ivy.xml
[error]   not found: https://repo1.maven.org/maven2/org/typelevel/munit-cats-effect-3_sjs1_2.13/1.0.4/munit-cats-effect-3_sjs1_2.13-1.0.4.pom
[error] (ce3JVM / mimaPreviousClassfiles) sbt.librarymanagement.ResolveException: Error downloading org.typelevel:munit-cats-effect-3_2.13:1.0.4
evel:munit-cats-effect-2_2.13:1.0.2 (e:info.versionScheme=early-semver)! Found 3 potential problems
[error]  * object munit.CatsEffectFixtures#ResourceSuiteLocalFixture does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("munit.CatsEffectFixtures$ResourceSuiteLocalFixture$")
[error]  * class munit.CatsEffectFixtures#ResourceSuiteLocalFixture#FixtureNotInstantiatedException does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("munit.CatsEffectFixtures$ResourceSuiteLocalFixture$FixtureNotInstantiatedException")
[error]  * method ResourceSuiteLocalFixture()munit.CatsEffectFixtures#ResourceSuiteLocalFixture# in class munit.CatsEffectSuite has a different result type in current version, where it is munit.CatsEffectFixturesPlatform#ResourceSuiteLocalFixture# rather than munit.CatsEffectFixtures#ResourceSuiteLocalFixture#
[error]    filter with: ProblemFilters.exclude[IncompatibleResultTypeProblem]("munit.CatsEffectSuite.ResourceSuiteLocalFixture")
[error] munit-cats-effect-3: Failed binary compatibility check against org.typelevel:munit-cats-effect-3_sjs1_2.13:1.0.5 (e:info.versionScheme=early-semver)! Found 1 potential problems
[error]  * method ioRuntime()cats.effect.unsafe.IORuntime in class munit.CatsEffectSuite does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("munit.CatsEffectSuite.ioRuntime")
[error] munit-cats-effect-3: Failed binary compatibility check against org.typelevel:munit-cats-effect-3_2.13:1.0.1 (e:info.versionScheme=early-semver)! Found 3 potential problems
[error]  * object munit.CatsEffectFixtures#ResourceSuiteLocalFixture does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("munit.CatsEffectFixtures$ResourceSuiteLocalFixture$")
[error]  * method ResourceSuiteLocalFixture()munit.CatsEffectFixtures#ResourceSuiteLocalFixture# in class munit.CatsEffectSuite has a different result type in current version, where it is munit.CatsEffectFixturesPlatform#ResourceSuiteLocalFixture# rather than munit.CatsEffectFixtures#ResourceSuiteLocalFixture#
[error]    filter with: ProblemFilters.exclude[IncompatibleResultTypeProblem]("munit.CatsEffectSuite.ResourceSuiteLocalFixture")
[error]  * method ioRuntime()cats.effect.unsafe.IORuntime in class munit.CatsEffectSuite does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[DirectMissingMethodProblem]("munit.CatsEffectSuite.ioRuntime")
[info] Fetched artifacts of 
[error] munit-cats-effect-2: Failed binary compatibility check against org.typelevel:munit-cats-effect-2_2.13:1.0.2 (e:info.versionScheme=early-semver)! Found 3 potential problems
[error]  * object munit.CatsEffectFixtures#ResourceSuiteLocalFixture does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("munit.CatsEffectFixtures$ResourceSuiteLocalFixture$")
[error]  * class munit.CatsEffectFixtures#ResourceSuiteLocalFixture#FixtureNotInstantiatedException does not have a correspondent in current version
[error]    filter with: ProblemFilters.exclude[MissingClassProblem]("munit.CatsEffectFixtures$ResourceSuiteLocalFixture$FixtureNotInstantiatedException")
[error]  * method ResourceSuiteLocalFixture()munit.CatsEffectFixtures#ResourceSuiteLocalFixture# in class munit.CatsEffectSuite has a different result type in current version, where it is munit.CatsEffectFixturesPlatform#ResourceSuiteLocalFixture# rather than munit.CatsEffectFixtures#ResourceSuiteLocalFixture#
[error]    filter with: ProblemFilters.exclude[IncompatibleResultTypeProblem]("munit.CatsEffectSuite.ResourceSuiteLocalFixture")

I'm sure that we shouldn't add filters for those problems because we are enabling MiMa only from 1.0.7. From my perspective, it would be fine even if we'll start checking it from the current version, not from the previous.

@armanbilge
Copy link
Member

Yes, I agree we should not filter these issues. I was curious if there is any hope to fix them.

Thanks for posting that. Actually, now I see those problems seem to be my fault in #104 😅

I'm not hopeful, but maybe it can be fixed.

@danicheg
Copy link
Member Author

@armanbilge if I get it right, if we fix it, that would mean we will have binary issues with 1.0.6 and 1.0.7 versions 😄

@armanbilge
Copy link
Member

No, I think we may be able to fix it for everything :)

@danicheg
Copy link
Member Author

Yeah, in theory, I may guess it so. But can we do it separately from this PR, WDYT?

@armanbilge
Copy link
Member

Nope, I was wrong. There's at least one method that is completely incompatible between 1.0.0-1.0.5 and 1.0.6-1.0.7. So somebody has to break.

[error]  * method ResourceSuiteLocalFixture()munit.CatsEffectFixturesPlatform#ResourceSuiteLocalFixture# in class munit.CatsEffectSuite has a different result type in current version, where it is munit.CatsEffectFixtures#ResourceSuiteLocalFixture# rather than munit.CatsEffectFixturesPlatform#ResourceSuiteLocalFixture#

👍 from me, this PR seems the right way forward.

@danicheg
Copy link
Member Author

So, let's merge this and see what happens. If someone will have concerns about it - feel free to reconfigure MiMa as needed.

@danicheg danicheg merged commit 56fb2f4 into main Feb 17, 2022
@danicheg danicheg deleted the mima branch February 17, 2022 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable MiMa
2 participants